<template>
    <div class="box">
        <h4>one组件</h4>
        <!-- <div>num:{{ $store.state.num }}</div> -->
        <div>num:{{ $store.getters.num }}</div>
        <div>num:{{ num }}</div>
        <div>name:{{ name }}</div>
    </div>
</template>

<script>

//使用辅助函数获取数据
import  { mapGetters }  from  "vuex";
export default {
        computed:{
            ...mapGetters(["num","name"])
        }
    }
</script>

<style  scoped>

</style>